﻿using AiFrame.InterfaceLib.MVP;
using AiFrame.InterfaceLib.Plugins;
using AiFrame.InterfaceLib.Plugins.Events;
using AiFrameDemo.Contacts.Core;
using AiFrameDemo.Contacts.WinForms.Windows;
using AiFrameDemo.Lib.Model;

namespace AiFrameDemo.Contacts.WinForms
{
    public class ContactsPlugin : IPlugin
    {
        private ContactsController _controller = new ContactsController();

        #region IPlugin Members

        public void Load(ICoreInterface ci, string programPath)
        {
            ContactsFactory.ContactsViewFactory = new ContactsViewFactory();
            ContactsFactory.ContactCollectionFactory = new ContactCollectionFactory();
            _controller.Load(ci, programPath);


        }

        public void Unload()
        {
            // Unload actions.
        }

        public string GetCaption()
        {
            return "Contacts Plugin";
        }

        #endregion

    }
}